import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const charts: AppRouteModule = {
  path: '/agency',
  name: 'Agency',
  component: LAYOUT,
  redirect: '/agency/dashboard',
  meta: {
    orderNo: 100,
    icon: 'ion:bar-chart-outline',
    title: t('routes.demo.agency.agencyTitle'),
    roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
  },
  children: [
    {
      path: 'dashboard',
      name: 'AgencyDashboard',
      meta: {
        title: t('routes.demo.agency.dashboard'),
        roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
      },
      component: () => import('/@/views/locality/agency/dashboard.vue'),
    },
    {
      path: 'buy',
      name: 'Buy',
      meta: {
        title: t('routes.demo.agency.buy'),
        roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
      },
      component: () => import('/@/views/locality/agency/buy.vue'),
    },
    {
      path: 'invite',
      name: 'InviteAgency',
      meta: {
        title: t('routes.demo.agency.invite'),
        roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
      },
      component: () => import('/@/views/locality/agency/invite.vue'),
    },
    {
      path: 'nodeStatus',
      name: 'nodeStatusAgency',
      meta: {
        title: t('routes.demo.agency.nodeStatus'),
        roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
      },
      component: () => import('/@/views/locality/agency/nodeStatus.vue'),
    },
    {
      path: 'document',
      name: 'DocumentAgency',
      meta: {
        title: t('routes.demo.agency.document'),
        roles: [RoleEnum.MEMBER, RoleEnum.ADMIN, RoleEnum.OTHER],
      },
      component: () => import('/@/views/locality/agency/document.vue'),
    },
  ],
};

export default charts;
